<template>
  <div>
    <div class="line">
      <div class="imgGroup">
        <div v-for="(i, index) in tip" class="item">
          <img :src="i.icon" class="imgItem" :style="{ backgroundColor: `${stepsColor(index)}` }" />
          <div>{{ i.name }}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue'

const tip = [
  { name: '暂存', icon: 'iocn1' },
  { name: '待领取', icon: 'iocn2' },
  { name: '待派发', icon: 'iocn3' },
  { name: '待受理', icon: 'iocn4' },
  { name: '处理中', icon: 'iocn5' },
  { name: '办理审核', icon: 'iocn6' },
  { name: '已办结', icon: 'iocn7' },
  { name: '已回访', icon: 'iocn8' },
  { name: '已归档', icon: 'iocn9' },
]
defineProps({
  current: {
    type: Number,
    default: 3,
  },
})
const stepsColor = computed(() => {
  return (idx: number) => {}
})
</script>
<style scoped>
.line {
  width: 700px;
  height: 10px;
  background-color: #eee;
  position: relative;
  border-radius: 0 10px 10px 0;
}
.imgGroup {
  width: 103%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: -5px;
  left: -10px;
}
.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #999;
}
.imgItem {
  width: 20px;
  height: 20px;
  margin-bottom: 5px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 0 10px #ccc;
  box-direction: 1px solid red;
}
</style>
